package fr.ants.utils;

import java.util.Random;

/**
 * <p>Class with handy math methods, such as random.</p>
 *
 * @author Vianney DUPOY DE GUITARD
 *
 */
public class MathUtils {

	/** Private constructor : all methods are static. */
	private MathUtils() {}

	/**
	 * Generates a random number in a range.
	 * @param min : min value.
	 * @param max : max value.
	 * @return a random value between min & max.
	 */
	public static int rnd(int min, int max) {
		Random rand = new Random();
		return rand.nextInt(max - min + 1) + min;
	}
}
